package com.sduept.nwld.kpi.datasource;

import java.util.List;
import java.util.TreeSet;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.sduept.core.entity.IdentifiedObject;

@Entity
@Table(name="t_kpi_KpiDataSource")
public class KpiDataSource extends IdentifiedObject{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1227391109278808868L;
	
	/**
	 * 本地表名
	 */
	private String tableName;
	/**
	 * 是否能得到此数据源
	 */
	private boolean available = true;
	/**
	 * 数据源可靠度
	 */
	private Integer reliabilityParam = 0;
	/**
	 * 数据源可靠度描述
	 */
	private String reliabilityDesc;
	/**
	 * 数据源来源描述
	 */
	private String sourceDesc;
	/**
	 * 统计的条件
	 */
	@Transient
	private List<KpiQueryCondition> countCondition ;
	
	@Transient
	public TreeSet<KpiDataElement> properties = new TreeSet<>();
	private Integer persistenceType = 0;
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public boolean isAvailable() {
		return available;
	}
	public void setAvailable(boolean available) {
		this.available = available;
	}
	public Integer getReliabilityParam() {
		return reliabilityParam;
	}
	public void setReliabilityParam(Integer reliabilityParam) {
		this.reliabilityParam = reliabilityParam;
	}
	public String getReliabilityDesc() {
		return reliabilityDesc;
	}
	public void setReliabilityDesc(String reliabilityDesc) {
		this.reliabilityDesc = reliabilityDesc;
	}
	public String getSourceDesc() {
		return sourceDesc;
	}
	public void setSourceDesc(String sourceDesc) {
		this.sourceDesc = sourceDesc;
	}
	public List<KpiQueryCondition> getCountCondition() {
		return countCondition;
	}
	public void setCountCondition(List<KpiQueryCondition> countCondition) {
		this.countCondition = countCondition;
	}
	public TreeSet<KpiDataElement> getProperties() {
		return properties;
	}
	public void setProperties(TreeSet<KpiDataElement> properties) {
		this.properties = properties;
	}
	public Integer getPersistenceType() {
		return persistenceType;
	}
	public void setPersistenceType(Integer persistenceType) {
		this.persistenceType = persistenceType;
	}
	
}
